package com.abbas.smartCity.view;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ExpandableListView;

/**
 * 控件发生刷新时将会重置高度，适用于ScrollView嵌套
 */
public class MExpandableListView extends ExpandableListView {
    public MExpandableListView(Context context) {
        super(context);
    }

    public MExpandableListView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MExpandableListView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    public MExpandableListView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 4, MeasureSpec.AT_MOST));
    }
}
